package read.niit.controller

import read.niit.handler.DataHandler
import read.niit.service.{DataReaderService, ReaderRecommendService, Top10WithMinScoreService, Top4WithGradeBookService}

class DataReaderController {

  private val dataReaderService = new DataReaderService()
  private val readerRecommendService = new ReaderRecommendService()
  private val top10WithMinScoreService = new Top10WithMinScoreService
  private val top4WithGradeBookService = new Top4WithGradeBookService

  def dispatch(): Unit = {

    val reader = DataHandler.kafkaReaderDataHandler("BD2", "reader")

    // 统计4.23日当天不同年级学生借阅书籍情况
  //   dataReaderService.dataAnalysis(reader)
  //  readerRecommendService.dataAnalysis(reader)
  //  top10WithMinScoreService.dataAnalysis(reader)

    top4WithGradeBookService.dataAnalysis(reader)


    DataHandler.startAndAwait()


  }

}